<template>
  <el-card shadow="never">
    <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
      <el-tab-pane label="合同审批配置" name="Contract">
        <el-row class="mb-10px">
          <el-button type="primary" :icon="Plus" @click="openForm('create')">新建审批流程</el-button>
        </el-row>
        <el-table :data="tableData" border style="width: 100%">
          <el-table-column prop="date" label="Date" width="180" />
          <el-table-column prop="name" label="Name" width="180" />
          <el-table-column prop="address" label="Address" />
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="回款审批配置" name="Return">
        回款审批配置
      </el-tab-pane>
    </el-tabs>
  </el-card>
  <ExamineForm ref="formRef" />
</template>
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import ExamineForm from './ExamineForm.vue'
defineOptions({ name: 'CrmExamineConfig' })
const activeName = ref('Contract')
const handleClick = (tab: TabsPaneContext, event: Event) => {

}
const tableData = [
  {
    date: '2016-05-03',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: 'No. 189, Grove St, Los Angeles',
  },
]

/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
  formRef.value.open(type, id)
}
</script>
